﻿@{
    ViewBag.Title = "创建Slider";
    Layout = "~/Views/Shared/_Layout_manage.cshtml";
}

<div class="contentcontainer">
    <div class="headings">
        <h2>添加Slider</h2>
    </div>
    <div class="contentbox">
        @using (Html.BeginForm("SliderCreate", "Slider", FormMethod.Post, new { enctype = "multipart/form-data" }))
        {
            //使用此控件会限制文件大小最大上传4M；可在Web.config中配置<httpRuntime executionTimeout="5400"
            // maxRequestLength="2048000" 文件大小  useFullyQualifiedRedirectUrl="false" />
                
            <table width="100%" border="0" cellpadding="0" cellspacing="0">
                <tr>
                    <th width="200px">标题</th>
                    <td>
                        <input type="text" id="ImgTitle" name="ImgTitle" class = "box" />
                    </td>
                </tr>
                <tr>
                    <th>项目金额</th>
                    <td>
                        <input type="text" id="TargetValue" name="TargetValue" class = "box" />
                    </td>
                </tr>
                <tr>
                    <th>项目类型</th>
                    <td>
                        @{
                            List<SelectListItem> selectList = new List<SelectListItem>();
                            selectList.Add(new SelectListItem { Text = "--请选择类型--", Value = "0", Selected = true });
                            foreach (var e in Enum.GetValues(typeof(WmWebSystem.Models.Enum.ProjectType))) 
                            {
                                selectList.Add(new SelectListItem { 
                                    Text = Enum.GetName(typeof(WmWebSystem.Models.Enum.ProjectType), e), 
                                    Value = ((int)e).ToString() 
                                });
                              }
                              @Html.DropDownList("projectType", selectList);
                            }
                        
                    </td>
                </tr>
                <tr>
                    <th>摘要</th>
                    <td>
                        <textarea class="text-input textarea" id="Description" name="Description"></textarea>
                    </td>
                </tr>
                <tr>
                    <th>项目描述</th>
                    <td>
                        <textarea class="text-input textarea" id="Brief" name="Brief"></textarea>
                    </td>
                </tr>
                <tr>
                    <th>
                        Slider图片(200px*125px)
                    </th>
                    <td>
                        <input type="file" name="ImgUrl" id="ImgUrl" />
                    </td>
                </tr>
                <tr>
                    <th>链接地址</th>
                    <td>
                        <input type="text" id="NewsUrl" name="NewsUrl" class = "box"  />
                        例如："http://www.iwatchman.com/project/id=1"
                    </td>
                </tr>
                <tr>
                    <th></th>
                    <th>
                        <input type="submit" class="btn" id="Submit" value="创建Slider>>" title="创建" />
                        <input type="button" class="myInput_Buttom" onclick="history.go(-1)" id="reset" value="取消" title="取消" />
                    </th>
                </tr>
                </table>
                
        }
        <div style="clear: both;"></div>
    </div>
</div>

<script type="text/javascript">
    CKEDITOR.replace('Brief');
</script>


  
